<!--#
 @version 0.3 (auto-set)
#-->
<big><#LANG_MODULE_USB_DEVICES#></big>
[#if VIEW_MODE=""#]
[#if DEVICES#]
<p align="center"><a href="?mode=delete_unknown" onclick="return confirm('<#LANG_ARE_YOU_SURE#>');"><#LANG_DELETE_UNKNOWN_DEVICES#>
<table width="100%" border="1" cellpadding="3">
 <tr>
  <td valign="top" align="center"><b><#LANG_TITLE#></b></td>
  <td valign="top" align="center"><b><#LANG_SERIAL#></b></td>
  <td valign="top" align="center"><b><#LANG_FIRST_ATTACHED#></b></td>
  <td valign="top" align="center"><b><#LANG_LAST_ATTACHED#></b></td>
  <td valign="top" align="center"><b><#LANG_USER#></b></td>
  <td valign="top">&nbsp;</td>
 </tr>
 [#begin DEVICES#]
 <tr>
  <td valign="top">[#TITLE#]</td>
  <td valign="top">[#SERIAL#]</td>
  <td valign="top">[#FIRST_FOUND#]</td>
  <td valign="top">[#LAST_FOUND#]</td>
  <td valign="top">[#NAME#]&nbsp;</td>
  <td valign="top"><a href="?view_mode=edit_usbdevices&id=[#ID#]"><#LANG_EDIT#></a>
  <a href="?view_mode=delete_usbdevices&id=[#ID#]" onClick="return confirm('<#LANG_ARE_YOU_SURE#>')"><#LANG_DELETE#></a>
  </td>
 </tr>
 [#end DEVICES#]
</table>
[#else DEVICES#]
<p><#LANG_NO_RECORDS_FOUND#></p>
[#endif DEVICES#]
[#endif VIEW_MODE#]

[#if VIEW_MODE="edit_usbdevices"#]
<p align="center"><a href="?"><#LANG_BACK#></a></p>
<table border="0" align="center">
 <form action="?" method="post">
 <tr>
  <td align="right"><#LANG_TITLE#>:</td>
  <td><input type="text" name="title" value="[#TITLE#]" size="50"</td>
 </tr>
 <tr>
  <td align="right"><#LANG_USER#>:</td>
  <td><select name="user_id">
   <option value="0">n/a
   [#begin USERS#]
   <option value="[#ID#]"[#if ID="<#USER_ID#>"#] selected[#endif SELECTED#]>[#NAME#]
   [#end USERS#]
  </select></td>
 </tr>
 <tr>
  <td valign="top" align="right"><#LANG_EXECUTE_ON_ATTACH#>:</td>
  <td valign="top">
  <input type="radio" name="run_type" value="script"[#if SCRIPT_ID!="0"#] checked[#endif#]> <#LANG_SCRIPT#>:
   <select name="script_id">
    <option value="0">
    [#begin SCRIPTS#]
        <option value="[#ID#]"[#if ID="<#SCRIPT_ID#>"#] selected[#endif#]>[#TITLE#]
        [#end SCRIPTS#]
   </select>    
   <br>
   <input type="radio" name="run_type" value="code"[#if SCRIPT_ID="0"#] checked[#endif#]> <#LANG_CODE#>:<br>
 [#if ERRORS!=""#]
 <font color='red'>[#ERRORS#]</font><br>
 [#endif ERRORS#]  
  <textarea name="script" rows=5 cols=60 class="field span8">[#SCRIPT#]</textarea></td>
 </tr>
 <tr>
  <td align="right"><#LANG_SERIAL#>:</td>
  <td>[#SERIAL#]</td>
 </tr>
 <tr>
  <td align="right"><#LANG_FIRST_ATTACHED#>:</td>
  <td>[#FIRST_FOUND#]</td>
 </tr>
 <tr>
  <td align="right"><#LANG_LAST_ATTACHED#>:</td>
  <td>[#LAST_FOUND#]</td>
 </tr>


 <tr>
  <td valign="top">&nbsp;</td>
  <td valign="top"><input type="submit" name="submit" value="<#LANG_UPDATE#>"></td>
 </tr>
 <input type="hidden" name="view_mode" value="<#VIEW_MODE#>">
 <input type="hidden" name="id" value="[#ID#]">
 <input type="hidden" name="mode" value="update">
 </form>
 
 <tr>
  <td align="right" valign="top"><#LANG_HISTORY#>:</td>
  <td>[#LOG#]</td>
 </tr> 

</table>
[#endif VIEW_MODE#]